<?php
final class CWF
{
	static public function run()
	{
		self::set_define();
		self::load_core_file();
		Application::run();
	}
	static private function set_define()
	{
		//框架根目录 D:\Dropbox\Website\houdun\cwf/
		define("CWF_PATH",dirname(__FILE__).'/');
		//项目根目录 /App/
		define("__ROOT__",dirname($_SERVER['SCRIPT_NAME']).'/');
		// http://beta.cuiwei.net/App/index.php
		define("__WEB__",'http://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME']);
		// http://beta.cuiwei.net/App
		// define("__ROOT__",dirname(__WEB__));
	}
	static private function load_core_file()
	{
		require 'Functions/functions.php';
		require 'Application.class.php';
	}
}
CWF::run();
?>